package com.ms.common.enums;

public enum LockEnum {

    NORMAL(0, "正常"),

    LOCKED(1, "锁住");

    private final Integer value;

    private final String text;

    LockEnum(Integer value, String text) {
        this.value = value;
        this.text = text;
    }

    public Integer getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static LockEnum getInstance(Integer value) {

        for (LockEnum lockEnum : values()) {
            if (value.equals(lockEnum.value)) {
                return lockEnum;
            }
        }
        return null;
    }

}
